package com.hudson.admin.controller;


import com.hudson.admin.client.NameSrvClient;
import com.hudson.admin.domain.Result;
import com.hudson.admin.util.Results;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: 渔小鲤
 * @DateTime: 2025/7/24 22:14
 **/
@RestController
@RequestMapping("/name-srv")
public class NameSrvController {
    @Resource
    private NameSrvClient nameSrvClient;


    @GetMapping()
    public Result<Map<String, String>> getBrokerInfo() {
        Map<String, String> brokerInfo = nameSrvClient.getBrokerInfo();
        return Results.success(brokerInfo);
    }
}
